import Cookies from 'js-cookie'

/*
* 获取cookies
*/
export function getCookies (key) {
  return Cookies.get(key)
}
/*
* 设置cookies
*/
export function setCookies (key, value, expiresTime) {
  // let seconds = expiresTime
  // let expires = new Date(new Date() * 1 + seconds * 1000)
  return Cookies.set(key, value, {expires: expiresTime})
}

/**
 * 移除cookies
 */

export function removeCookies (key) {
  return Cookies.remove(key)
}


// 设置个人信息
export function setUserInfoCookies (key, value, expiresTime) {
  return Cookies.set(key, value, {expires: expiresTime})
}

// 移除个人信息
export function removeUserInfoCookies (key) {
  return Cookies.remove(key)
}

// 设置个人权限
export function setPerCookies (key, value, expiresTime) {
  return Cookies.set(key, value, {expires: expiresTime})
}

// 移除个人权限
export function removePerCookies (key) {
  return Cookies.remove(key)
}
